package com.excellence.globalexception;

import com.excellence.datamodel.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 徐瑞琪
 */
@RestControllerAdvice
public class AllException {
    @ExceptionHandler(Exception.class)
    public Result allException(Exception e){
        e.printStackTrace();
        return Result.error(500,"操作失败！！！");
    }
}
